﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domains
{
    public class Output : Domain
    {      
        public static Value el(int i, Input domain)
        {
            return domain.Value[i];
        }

        public static Value head(Input domain)
        {
            return domain.Value.First(); ;
        }

        public static Input tail(Input domain)
        {
            return new Input(domain.Value.Skip(1).ToList());
        }

        public static bool Null(Input domain)
        {
            return domain.Value.Count() == 0 ? false : true;
        }
        public List<Value> Value
        {
            get;
            private set;
        }

        public Output(List<Value> list)
        {
            Value = list;
        }
        public Output()
        {
            Value = new List<Value>();
        }
    }
}
